package com.jake.xpage.demos.applemusic;

import com.jake.xpage.demos.applemusic.pages.AMSubPage;
import com.jake.xpage.router.XPageRouteMapper;

public class AppleMusicRouteMapper extends XPageRouteMapper {
    public static final String MODULE = "appleMusic";

    public AppleMusicRouteMapper() {
        configRoutes();
    }

    protected void configRoutes() {
        register(AppleMusicPageRouteDef.SUB_PAGE, (context, route) -> {
            AMSubPage page = new AMSubPage(context);
            page.setArgument(route.argument);
            return page;
        });
    }

    @Override
    public String moduleName() {
        return MODULE;
    }
}
